{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Day06 基础构图元素：坐标轴篇（下）\n",
    "\n",
    "　　作为`matplotlib`基础构图元素之**坐标轴**部分的**下篇**，今天我们来对`matplotlib`中坐标轴常用设置一网打尽："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:53.720039Z",
     "iopub.status.busy": "2020-10-19T15:27:53.719035Z",
     "iopub.status.idle": "2020-10-19T15:27:53.908563Z",
     "shell.execute_reply": "2020-10-19T15:27:53.908563Z",
     "shell.execute_reply.started": "2020-10-19T15:27:53.720039Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "matplotlib版本： 3.3.2\n"
     ]
    }
   ],
   "source": [
    "import matplotlib;print('matplotlib版本：', matplotlib.__version__)\n",
    "import matplotlib.pyplot as plt # 从matplotlib中导入我们最经常使用的pyplot子模块\n",
    "import pandas as pd # 用于处理外部数据集\n",
    "\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei'] # 设定默认字体为SimHei以解决中文显示乱码问题\n",
    "plt.rcParams['axes.unicode_minus'] = False # 解决图像负号'-'不正常显示的问题"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- **设置主要与次要刻度的位置**\n",
    "\n",
    "　　`matplotlib`中的坐标轴刻度，细分来说，可划分为**主要刻度**与**次要刻度**，之前日程中学习到有关坐标轴刻度的内容，默认都是主要刻度，而通过从`matplotlib`引入子模块`ticker`，我们可以创建出更丰富的坐标轴。\n",
    "\n",
    "　　基本使用方法格式为`ax.x或yaxis.set_major或minor_locator(locator)`，譬如`ax.yaxis.set_minor_locator(locator)`就对y轴的次要刻度进行设置，其中括号里传入的`locator`就来自`ticker`子模块，我们下面来学习`ticker`中常用的几种确立刻度位置的方式："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:53.910523Z",
     "iopub.status.busy": "2020-10-19T15:27:53.909526Z",
     "iopub.status.idle": "2020-10-19T15:27:54.075133Z",
     "shell.execute_reply": "2020-10-19T15:27:54.075133Z",
     "shell.execute_reply.started": "2020-10-19T15:27:53.910523Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATEAAAEtCAYAAABgcVeIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOAklEQVR4nO3dXYhkd5nH8d+zZQWOa0xNSBnpRpwVQl0sgzbbxHXdLBMxlF6IvcMuXogBXxjiit4VTOEi6IUjVvBGTJZW15u4q7koC8RdCtkQjOwG6VC7FCsWeJEIpxlsJaVGDtg0jxfT3TPdznS9dJ069VR9PzAw86+uqudA+KbOS9cxdxcARPVnRQ8AAOdBxACERsQAhEbEAIRGxACERsQAhPa6Wb7YAw884BcvXpzlSwKAXnrppV+5e/VOj800YhcvXtTOzs4sXxIAZGav3O0xdicBhEbEAIRGxACERsQAhEbEAIRGxACERsQAhDbT68QA4CydXqpWd6DdYaa1SqJGvaatjfVzvSYRAzAXnV6qZruvbP9AkpQOMzXbfUk6V8jYnQQwF63u4DhgR7L9A7W6g3O9LhEDMBe7w2yi9XERMQBzsVZJJlofFxEDMBeNek1JuXRiLSmX1KjXzvW6HNgHMBdHB+85OwkgrK2N9XNH6zR2JwGERsQAhEbEAIRGxACERsQAhEbEAIRGxACERsQAhEbEAIRGxACERsQAhEbEAIRGxACERsQAhEbEAIRGxACERsQAhEbEAIRGxACERsQAhHbmjULM7IKkb0u6V9L/u/sTc5kKQO46vXTmdx4qwqhPYh+R9Iy7PyLpXjPbnMNMAHLW6aVqtvtKh5lcUjrM1Gz31emlRY82sVER+7WkmplVJL1F0i9ynwhA7lrdgbL9gxNr2f6BWt1BQRN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i3G9p33uaf/RN6d/H6Q502riDmXfRvZvtlaiP/WZro7OdUAZjvuvlnoEDla9u2Tln8b2b7FtgifxLaLHiBny7590vJvI9u3wAr/JAYA57EIn8QAYGpELCdmdp+Z/aeZ/dDMvmdm9xQ9Ux7M7EEz6xU9R57M7Ckz+0DRc8yamV0ws/8wsxfM7F+KnmdahUZs1reCWzAflvQVd39M0g1J7yt4nrw8qVtfX750zOwRSW9293mf+ZuHj0h6xt0fkXSvmYU8uF9YxPK4Fdwicfen3P2Hh/+sSvplkfPkwczeI+n3uhnppWNmZUlfl/SymX2w6Hly8GtJNTOrSHqLpF8UO850ivwkdlln3ApuWZjZuyRdcPcXi55llg53jz8n6VrRs+TocUk/lfRlSQ+b2acLnmfWfizpIUmfkfQzSa8WO850iozYmbeCWwZmdr+kr0r6WNGz5OCapK+5+7DoQXK0oZtXlt+Q9IykRwueZ9a+KOkJd/+CbkbsowXPM5UiIzbzW8EtksNPKs9Karr7pL9PGsF7JX3KzJ6X9A4z+0bB8+Th55Ledvj3TU3+e8GL7vWSLplZSdI7JYW83qqw68TM7HFJb3L3J83s85IG7v5vhQyTAzP7pG7+n+7/DpeedvfvFjhSbszseXe/XPQcs2Zm90r6V93cSyhL+gd3T89+Vhxm9rCkb0l6q6T/kfT37v5asVNNrsiIvVHSC5L+S4e3gnPupARgQoVesW9mFyQ9JulHh8cdAGAi/NoRgNCW6mA6gNVDxACERsQAhEbEAIRGxACE9kfRl/sqnalp/wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from matplotlib import ticker\n",
    "\n",
    "x = [i for i in range(10)]\n",
    "y = x\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "# MultipleLocator以传入的数值为间距创建等间距的指定刻度\n",
    "ax.xaxis.set_minor_locator(ticker.MultipleLocator(0.5));"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:54.077083Z",
     "iopub.status.busy": "2020-10-19T15:27:54.077083Z",
     "iopub.status.idle": "2020-10-19T15:27:54.203739Z",
     "shell.execute_reply": "2020-10-19T15:27:54.203739Z",
     "shell.execute_reply.started": "2020-10-19T15:27:54.077083Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATYAAAEtCAYAAACCrUzxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOMklEQVR4nO3dXYhkd5nH8d+zZQUqa3ZqQppIN7KjEOpiGbSx8SUxMhMM5YJiE1hyIQq+MAQl3hVMoXjhhROs4I0Yl9ZcCFlcclFb4MtSuIYhUQlLhxIKxQIvEuE0g62kJr4c2KZ49qJfMj2Z7jrVfapO1dPfDwR6/l1VeQ6Bb+r0v3r+5u4CgEj+oegBACBvhA1AOIQNQDiEDUA4hA1AOIQNQDhvy/PF7rvvPr9w4UKeLwkAeuWVV/7k7ktZH59r2C5cuKDNzc08XxIAZGavTfJ4bkUBhEPYAIRD2ACEQ9gAhEPYAIRD2ACEQ9gAhJPr59gAxNbpJWp1B9oaplquVtSo17S+ulL0WG9B2ABk0uklarb7SndGkqRkmKrZ7kvS3MWNW1EAmbS6g4Oo7Ut3Rmp1BwVNdDTCBiCTrWE60XqRCBuATJarlYnWi0TYAGTSqNdUKZcOrVXKJTXqtYImOhqbBwAy2d8gYFcUQCjrqytzGbLbcSsKIBzCBiAcwgYgHMIGIBzCBiAcwgYgHMIGIBzCBiAcwgYgHMIGIBzCBiAcwgYgHMIGIBzCBiAcwgYgHMIGIBzCBiAcwgYgHMIGIBzCBiCcYw9zMbPzkv5D0j2SfuPuT8xkKgCZdHrJQpwaNWvj3r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]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "ax.set_xlim(0, 10)\n",
    "\n",
    "# LinearLocator用于指定对应坐标轴范围内出现多少个刻度，配合set_xlim使用就很舒服\n",
    "ax.xaxis.set_minor_locator(ticker.LinearLocator(21));"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:54.204737Z",
     "iopub.status.busy": "2020-10-19T15:27:54.204737Z",
     "iopub.status.idle": "2020-10-19T15:27:54.318432Z",
     "shell.execute_reply": "2020-10-19T15:27:54.318432Z",
     "shell.execute_reply.started": "2020-10-19T15:27:54.204737Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAASgAAAEtCAYAAAC7yv2qAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ+klEQVR4nO3dT2ikdxnA8ecxRghau5VWZRfpUpBcFFwoVUGhiho9FFfxJhb0IIroLWBAET14MOJFqFj/XVRQIQYKSipCUaEetgQJqAEPFpmlaC0pVOawLD8PTaLb3ehOMu+8z7zz+ZzSl23mN5cv+b0z7+/J1loAVPSyvhcAcBKBAsoSKKAsgQLKEiigLIECynr5JP/47rvvbhcvXuxoKcCieuqpp55trd3z0usTBerixYtx5cqV6a0KICIy8+lbXbfFA8oSKKAsgQLKEiigLIECyhIooCyBAsqa6HtQACfZ3h3F5s5+XD0Yx/lzK7G+thqXL1040+8UKODMtndHsbG1F+Nr1yMiYnQwjo2tvYiIM0XKFg84s82d/eM4HRlfux6bO/tn+r23FajMfCgzH33++efP9GLAMF09GE90/XbdVqBaa4+11j555513nunFgGE6f25louu3yxYPOLP1tdVYWV664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mQ/1vY4uZOZdmfmLzLySmd/uez2n0VmgMvN7mflkZn6hq9fo2Ucj4huttfdFxDMR8f6e19OVr0fEIA+Uz8x3RsTrW2uP9b2WjnwsIn50+BWDOzJz7r5q0EmgMvPDEbHUWnt7RNyXmW/s4nX61Fp7pLX2q8P/vCci/t7nerqQme+OiH/FiwEelMxcjojvRMRfM/ODfa+nI/+MiDdl5rmIeENE/K3f5Uyuq7+gHoyInx7+/HhEvKOj1+ldZr49Iu5qrf2+77VM0+GW9YsR8fm+19KRhyPijxHxtYh4IDM/2/N6uvC7iLg3Ij4XEX+KiOf6Xc7kugrUKyNidPjzcxHxuo5ep1eZ+ZqI+GZEfKLvtXTg8xHxSGvtoO+FdORSRDzaWnsmIn4YEe/qeT1d+FJEfKq19pWI+HNEfLzn9Uysq0C9EP+5b/GqDl+nN4d/YfwsIjZaa5M8nzgv3hMRn8nMJyLiLZn53Z7XM21/iYj7Dn++PyZ7xnRe3BURb87MpYh4a0TM3XeKOvkeVGY+HBGvba19PTO/HBH7rbUfT/2FepSZn46Ir0bEHw4vfau19pMel9SZzHyitfZg3+uYpsy8IyK+Hy/+db8cER9prY3+9/81XzLzgYj4Qby4zXsyIj7UWnuh31VNpqtAvToifhsRv46ID0TE21pr/39uOsB/6eyb5Jl5V0S8NyJ+c7jPB5iIR12AsgZ38xoYDoECyhIooCyBAsoSKKCsfwMni3cHYdOVxQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "ax.yaxis.set_minor_locator(ticker.MultipleLocator(0.5))\n",
    "\n",
    "# 使用NullLocator关闭指定的坐标轴刻度\n",
    "ax.yaxis.set_major_locator(ticker.NullLocator());"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- **对主要与次要刻度标签进行格式化**\n",
    "\n",
    "　　类似前面的`locator`类，在`ticker`中还有专门用于控制坐标轴刻度标签格式的`formatter`类，用法只是把前面介绍的api中的“locator”替换为“formatter”即可，下面介绍常用的两种："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:54.319431Z",
     "iopub.status.busy": "2020-10-19T15:27:54.319431Z",
     "iopub.status.idle": "2020-10-19T15:27:54.444131Z",
     "shell.execute_reply": "2020-10-19T15:27:54.444131Z",
     "shell.execute_reply.started": "2020-10-19T15:27:54.319431Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATEAAAEhCAYAAAAXs5fzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAMBElEQVR4nO3dTYhrdxnH8d9jmsJBbVMxViZIoVCy0IuOBLWg0ooYXTlclAqi4AtXQXQXaFAR3Fww4kboYrS6sSgKIdCFjW4KCi2SkkVADbpokTMUR2uslgOG8LhoM/fO7Z1JMpPk5Em+H7hw+8/k5DlQvuS83Dnm7gKAqN6Q9wAAcBlEDEBoRAxAaEQMQGhEDEBoS42YmT21zO0BgHR+W+5Y5gfddddd9Vqtxj0bAJbt5bNeWGrEHnjgAfV6vWVuEgBkZn856zXOiQEIjYgBCI2IAQiNiAEIjYgBCI2IAQiNiAEIban3iQHAeTr9VK3uUEejTHulRI16VQf7lUttk4gBWItOP1WzPVA2nkiS0lGmZnsgSZcKGYeTANai1R2eBGwqG0/U6g4vtV0iBmAtjkbZQuvzImIA1mKvlCy0Pi8iBmAtGvWqkmLh1FpSLKhRr15qu5zYB7AW05P3XJ0EENbBfuXS0boVh5MAQiNiAEIjYgBCI2IAQiNiAEIjYgBCI2IAQiNiAEIjYgBCI2IAQiNiAEIj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85rrZld3/5duXKEEgI3BPzsCEBoRAxAaEQMQGhEDEBoRAxCaufvyNmZ2LOmFBd/2Vkn/uMDH3S3pIrd7rPt9UfbvMu+Nso/s3+2te/8u8t773P32/67R3XP9I6l3wfcdBnlfiP3bhX1k/zZj/y773lv/RD6cfDLI+y4qjzm3fR/Zv+XaiP/Xlno4eaEBzHruXst1iBXa9v2Ttn8f2b/NtgnfxA7zHmDFtn3/pO3fR/Zvg+X+TQwALmMTvokBwIURMQChETEAoRExAKERMQCh/R+kl3EYXvVpWgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "ax.xaxis.set_minor_locator(ticker.MultipleLocator(0.5))\n",
    "\n",
    "# NullFormatter关闭对应坐标轴刻度的标签\n",
    "ax.xaxis.set_major_formatter(ticker.NullFormatter());"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:54.445094Z",
     "iopub.status.busy": "2020-10-19T15:27:54.445094Z",
     "iopub.status.idle": "2020-10-19T15:27:54.565771Z",
     "shell.execute_reply": "2020-10-19T15:27:54.565771Z",
     "shell.execute_reply.started": "2020-10-19T15:27:54.445094Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATEAAAEuCAYAAADm5SUmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAO3klEQVR4nO3db4hsd33H8c+307kw1DR7Q7bRXay3gTpgvdW1S2xoLRuxHUsR10jrA4mgLbda0QelAxlaCYgQyIQ8CdzQ1UAfGPpHmI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+O2CbDcVe4xmTitjp27q9LeU2A/dz91+TJDP7oqQ/1cFXY/+vu//VhOZ7aWb2sKSr7v7igIfDrtHMrkj6lKT36eC+CoOEXZ+kD0n6hqSnJH3CzH7R3Z89tU3k9UnS1yT9nqRPSvqmDuZ7WvQ1njGpq5MX3tbtgm2G7beqwe94MmFm90l6VtJHztkk8hofl3TT3fsXbBN5fWs6+FWXlyV9XtIjA7aJvD5JekLSR93905K+JenDA7aJvsYzJhWxNLd1G7TNufuZ2XVJfXf/yd1PcnhYMHOH71S+IKnm7uf9knvkNb5L0sfN7Jakt5rZ5wZsE3l935b04OGf1zX4iwoir086OLF/3cwKkt4uadCHQKOv8awJXRX5eUn/IekZHbyNfYukzwzZ5t5BY4fbrkj6T0kPHf79hqQ/O/zzk5Iem/UVEEkfk/RDSbcOf57I2xrvWsctSW/K0/ok3aOD/wl9VQdX4X4jT+s7fN2HJP2XDt5ZfUXSr+ZtjQPXPcF/gFcl/YEOrv6k3ub0mKTX6eCk4uZd27xR0r9IelEH52vuy/of3KKukfXFXl8e1ziXv3ZkZkV338t6HtOU9zWyvviirHEuIwYAafG7kwBCI2IAQiNiAEIjYgBCI2IAQvt/usZDllRqFusAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "ax.xaxis.set_minor_locator(ticker.MultipleLocator(0.5))\n",
    "\n",
    "# FuncFormatter传入lambda函数来控制坐标刻度标签的格式化\n",
    "# 这里x即为我们操作的数值，而第二个参数pos是默认位置参数\n",
    "# 按照下面的例子书写即可，根据你的需求可以非常自由地创建格式\n",
    "ax.xaxis.set_major_formatter(ticker.FuncFormatter(lambda x, pos: '%.2f元' % x));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- **用tick_params()实现更灵活的坐标轴设置**\n",
    "\n",
    "　　在学习了前面所属的各种有关坐标轴的概念之后，我们认识到一个完整的坐标轴主要由**刻度**、**刻度标签**、**次要刻度**组成，而在`matplotlib`中有一个针对`Axes`对象的`tick_params()`方法，使得我们可以一行代码对坐标轴进行快速的格式设置，其主要参数如下：\n",
    "\n",
    "> **axis**：字符型，用于设置要作用到的坐标轴，`'x'`即指定x轴，`'y'`即指定y轴，`'both'`代表同时作用到x轴与y轴<br>\n",
    "> **which**：字符型，用于指定要进行设置的刻度类型，`'major'`代表主要刻度，`'minor'`代表次要刻度，`'both'`代表两种都进行设置<br>\n",
    "> **direction**：字符型，用于设置刻度位于图像内部还是外部，`'in'`表示内部，`'out'`表示外部，`'inout'`表示位于内外之间<br>\n",
    "> **length**：数值型，用于设置刻度的长度，单位为像素<br>\n",
    "> **width**：数值型，用于设置刻度的宽度，单位为像素<br>\n",
    "> **color**：用于设置刻度的颜色<br>\n",
    "> **pad**：数值型，用于设置刻度标签与刻度之间的像素间距<br>\n",
    "> **labelsize**：数值型，设置刻度标签的字体大小<br>\n",
    "> **labelcolor**：用于设置刻度标签的色彩<br>\n",
    "> **labelrotation**：数值型，用于设置刻度标签的旋转角度\n",
    "\n",
    "　　下面是一个示例，你可以对照上述参数查看具体得到修改的地方："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2020-10-19T15:27:54.566769Z",
     "iopub.status.busy": "2020-10-19T15:27:54.566769Z",
     "iopub.status.idle": "2020-10-19T15:27:54.701408Z",
     "shell.execute_reply": "2020-10-19T15:27:54.701408Z",
     "shell.execute_reply.started": "2020-10-19T15:27:54.566769Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAT4AAAEtCAYAAACRegwFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELA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ain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(5, 5))\n",
    "ax.scatter(x, y)\n",
    "\n",
    "ax.xaxis.set_minor_locator(ticker.MultipleLocator(0.5))\n",
    "\n",
    "ax.tick_params(axis='x', which='minor', direction='in')\n",
    "\n",
    "ax.tick_params(axis='y', which='major', direction='inout', width=4, length=20,\n",
    "               color='grey', labelcolor='red', labelrotation=90, labelsize=15);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 课后测验：\n",
    "\n",
    "　　通过前面几天的学习，相信你已经对`matplotlib`中的坐标轴设置有了全面的认识，交给你一个具有一定挑战性的任务，下面是一把尺子的示例，是我使用`matplotlib`制作出来的，请你结合这几个日程有关坐标轴所学到的知识，将他们融会贯通，尽量模仿还原出下面的尺子：\n",
    "  \n",
    "<center><img src='imgs/尺子示例.png' width=800></img></center>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 请在今天对应的帖子下回复你的文字代码及绘图结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1YAAABfCAYAAADru1Y+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAANr0lEQVR4nO3dfUyV9f/H8ddJxBNMOxKieUfm3YgtSxHBmTk38yad2hQxdOC0EsO5LOeYLm+YaTdqajNrmpozbZmaKU7/CEUtLDpz3rfS0OXS0TJU1Ay6fn+0+H1JCc73E3w+x+/zsZ0/uK5zXbyu9w7beV1c1zk+z/MEAAAAAPjv3WM7AAAAAACEO4oVAAAAABiiWAEAAACAIYoVAAAAABiiWAEAAACAoYhQntysWTOvS5cud1x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=\n",
      "text/plain": [
       "<Figure size 1080x108 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(15, 1.5))\n",
    "ax.set_xticks(range(0,11))\n",
    "ax.set_xlim(-0.5, 10.5)\n",
    "ax.xaxis.tick_top();\n",
    "ax.xaxis.set_minor_locator(ticker.MultipleLocator(0.1))\n",
    "ax.tick_params(axis='x', which='minor', direction='in',length=7)\n",
    "ax.tick_params(axis='x', which='major', direction='in',  length=15,\n",
    "               labelrotation=0, labelsize=15,pad=-35);\n",
    "ax.yaxis.set_major_locator(ticker.NullLocator());"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
